set -x
## 1. 环境安装
# pip3 install llmcompressor compressed-tensors

## 2. 权重及校准数据集下载 [校准数据集可根据业务场景制作来减少量化误差]
## 2.1 参考权重下载
# https://www.modelscope.cn/models/deepseek-ai/DeepSeek-R1-Distill-Qwen-14B
# modelscope download --model deepseek-ai/DeepSeek-R1-Distill-Qwen-14B --local_dir /home/weights/
## 2.2 参考校准数据集下载
# https://modelscope.cn/datasets/sogagaga/ultrachat_200k


## 3. 执行量化
python3 quantize.py \
--model /home/weights/DeepSeek-R1-Distill-Qwen-14B \
--dataset-path /home/data/ultrachat_200k \
--model-type qwen